<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
{{assign var="title" value=$title|default:'回收站'}}
{{assign var="app" value='recycle'}}
{{assign var="act" value='index'}}
{{assign var="table" value='recycle'}}
{{assign var="td" value='10'}}
<title>{{$title}}管理 - {{'admin|admin_site_name'|C|default:'后台管理'}}</title>
{{include file="include/base.html"}}
</head>
<body>

{{include file="include/sidebar.html"}}

<div class="body_right">
	<div id="content">
	
	<div class="search">
	<form action="index.php" name='search' class="router" method="get">
		<input type="hidden" name="app" value="{{$app}}"/>
		<input type="hidden" name="item" value="{{$smarty.get.item}}"/>
		<ul class="bread">
			<li class="floatr">
			</li>
			<li>
				表名：
				<select name="table">
					<option value="">全部...</option>
					{{foreach from=$tables item=val}}
					<option {{if $val==$smarty.get.table}}selected="selected"{{/if}} value="{{$val}}">{{$val}}</option>
					{{/foreach}}
				</select>
			</li>
			<li>
				操作者：<input class="input-small" type="text" name="author" maxlength="20" value="{{$smarty.get.author}}" />
			</li>
			<li>
				删除日期：<input class="input-small Wdate" type="text" name="adddate" value="{{$smarty.get.adddate}}" />
			</li>
			<li>
				<button type="submit" class="search btn btn-success"><i class="icon-search"></i>搜索</button>
				<a href="index.php?app={{$app}}&act={{$act}}{{if $smarty.get.item}}&item={{$smarty.get.item}}{{/if}}" class="a">清除</a>
			</li>
		</ul>
	</form>
	</div>

	<form name='form' action="index.php?app={{$app}}" method="post">
	<input type="hidden" name="app" value="{{$app}}"/>
	<input type="hidden" name="act" value=""/>
	<input type="hidden" name="table" value="{{$table}}"/>
	<table class="table table-bordered tablest">
		<tr class="thead">
		  <td colspan="{{$td}}">
		  	 <div class="floatr">
		  	 	<a class="btn btn-danger mydelete" href="javascript:"><i class="icon-trash icon-white"></i>彻底删除</a>
		  	 </div>
		  	 ◆ {{if !$smarty.get.item}}
			 <a href="index.php?app={{$app}}&act=type">{{$title}}管理</a> －> 
			 {{/if}}
		  	 {{$title}}列表
		  </td>
		</tr>
		{{if !$result}}
		<tr class="noline"><td colspan="{{$td}}" class="result_empty"></td></tr>
		{{else}}
		<tr class="ttitle">
			<th width="20"><label><input class="check_all" type="checkbox"/></label></th>
			<th width="70px">表名</th>
			<th width="">原数据ID</th>
			<th width="">操作者</th>
			<th width="">删除日期</th>
			<th width="80">操作</th>
		</tr>
		<tbody>
			{{foreach from=$result item=val key=key}}
			<tr>
				{{*全选*}}<td><label><input name="check_id[]" class="check_id" value="{{$val.id}}" type="checkbox"/></label> <input name="ids[]" value="{{$val.id}}" type="hidden"/> </td>
				{{*表名*}}<td>{{$val.table}}</td>
				{{*原数据ID*}}<td>{{$val.idid}}</td>
				{{*操作者*}}<td>{{$val.author}}</td>
				{{*删除日期*}}<td>{{$val.adddate}}</td>
				<td>
					<a link="index.php?app={{$app}}&act=undo&id={{$val.id}}" class="btn refresh btn-success ajaxSubmit"><i class="icon-undo"></i>还原</a>
				</td>
			</tr>
			<tr>
				<td colspan="2" class="textar">数据详情：</td><td colspan="4"><pre>{{$_=print_r($val.data)}}</pre></td>
			</tr>
		    {{/foreach}}
			<tr class="noline ttitle">
			  <td colspan="{{$td}}">
				<a class="check_all btn"><i class="icon-ok"></i>全选/反选</a>
			  </td>
			</tr>
			<tr class="thead">
			  <td colspan="{{$td}}">
				{{include file="include/page.html"}}
			  </td>
			</tr>
		</tbody>
		{{/if}}
	</table>
	</form>
</div>
</div>
<style>
pre{
	white-space:pre-wrap;
}
</style>

</body>
</html>